package com.wd.tech.mvp;

import com.wd.tech.Base.BasePresenter;
import com.wd.tech.contracts.Contract;

import java.util.Map;

/**
 * date:2020/7/2
 * author:王成虎(13671)
 * month:七月
 * function:
 */
public class Presenter extends BasePresenter {


    private Model model;

    @Override
    protected void initModel() {
        model = new Model();
    }

    //Xbanner
    @Override
    public void PresenterGetXBannerInfo(String url, Class cls) {
        model.ModelGetXBannerInfo(url, cls, new Contract.ICallBack() {
            @Override
            public void onSucces(Object o) {
                getView().onSucces(o);
            }

            @Override
            public void onError(String error) {

            }
        });
    }
    //资讯展示首页
    @Override
    public void PresenterGetNewsShow(String url, Map<String, Object> map, Class cls) {
        model.ModelGetNewsShow(url, map, cls, new Contract.ICallBack() {
            @Override
            public void onSucces(Object o) {
                getView().onSucces(o);
            }

            @Override
            public void onError(String error) {

            }
        });
    }


}
